void main() {
  print(Person.name);
  print(Person.getAge());

  var p = new Person();

  //类操作符 is:判断类型
  //as 强制转换
  if (p is Person) {
    Person t = p as Person;
  }

  //级联操作符 ..
  Person newPerson = new Person();
  //赋值+调用方法 简化操作
  newPerson
    ..desc = '青岛'
    ..age = 12
    ..printInfo();
}

class Person {
  static String name = "slx";

  int age;
  String desc;

  static int getAge() {
    return 1;
  }

  void printInfo() {
    print('$desc,$age');
  }
}
